package com.test.consumer.controller;


import com.test.consumer.UserFeignApi;
import com.test.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("feign")
public class FeignController {

    @Resource
    UserFeignApi userFeignApi;

    @GetMapping("{id}")
    public User queryById(@PathVariable("id") String id){
        return userFeignApi.findById(id);
    }
}